import { createSlice } from '@reduxjs/toolkit'
import type { AuthState } from '../interface'

const authState: AuthState = {
  authRouter: []
}

const auth = createSlice({
  name: 'auth',
  initialState: authState,
  reducers: {
    setAuthRouter(state, action) {
      state.authRouter = action.payload
    }
  }
})

const { setAuthRouter } = auth.actions
export { setAuthRouter }

export default auth.reducer